from selenium.webdriver.common.by import By
from unit_17.Page.Page_login import Page_login
# 页面类
class Page1(Page_login):
    print(1)
    # 点击 剑南春
    jnc_loc=(By.XPATH, '/html/body/div[4]/div/div[2]/div[2]/p/a[4]')
    def jnc(self):
        self.click(self.jnc_loc)

    # 点击 商品
    jnc_img_loc=(By.XPATH, '//img[@src="https://img07.jiuxian.com/2022/1108/0d264886abd7454c8e5cb069fa11718b4.jpg"]')
    def jnc_img(self):
        self.click(self.jnc_img_loc)

    # 点击 加入购物车
    addcar_loc=(By.NAME, 'detail_jiarugouwuche')
    def addcar(self):
        self.click(self.addcar_loc)

    # 点击 查看购物车
    look_car_loc=(By.XPATH, '//*[@id="u-buy-layId"]/div/div[3]/a[2]')
    def look_car(self):
        self.click(self.look_car_loc)

    # 点击 登录
    login_car_loc=(By.XPATH, '//*[@id="cart_container"]/div[2]/div[1]/div[4]/a')
    def login_car(self):
        self.click(self.login_car_loc)

    # 点击 去结算
    jiesuan_loc=(By.LINK_TEXT, '去结算')
    def jiesuan(self):
        self.click(self.jiesuan_loc)

    # 点击 提交订单
    submitOrder_loc=(By.ID, 'submitOrder')
    def submitOrder(self):
        self.click(self.submitOrder_loc)
